<% layout('/layouts/default.html', {title: '呼叫记录管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('呼叫记录')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<% if(hasPermi('phonenumprivacy:natatoriumCallInfo:edit')){ %>
					<a href="${ctx}/phonenumprivacy/natatoriumCallInfo/form" class="btn btn-default btnTool" title="${text('新增游泳馆隐私号码呼叫记录')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
				<% } %>
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${natatoriumCallInfo}" action="${ctx}/phonenumprivacy/natatoriumCallInfo/listData?natatoriumInfoId=${cookie('natatoriumInfoId')}" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('主叫号码')}：</label>
					<div class="control-inline">
						<#form:input path="peerNo" maxlength="20" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('被叫号码')}：</label>
					<div class="control-inline">
						<#form:input path="phoneNo" maxlength="20" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('显示号码')}：</label>
					<div class="control-inline">
						<#form:input path="calledDisplayNo" maxlength="20" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
// 		{header:'${text('游泳馆信息id')}', name:'natatoriumInfoId', index:'a.natatorium_info_id', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
// 			return '<a href="${ctx}/phonenumprivacy/natatoriumCallInfo/form?id='+row.id+'" class="btnList" data-title="${text('编辑游泳馆隐私号码呼叫记录')}">'+(val||row.id)+'</a>';
// 		}},
		{header:'${text('主叫号码')}', name:'peerNo', index:'a.peer_no', width:150, align:"center"},
		{header:'${text('被叫号码')}', name:'phoneNo', index:'a.phone_no', width:150, align:"center"},
		{header:'${text('显示号码')}', name:'calledDisplayNo', index:'a.called_display_no', width:150, align:"center"},
		{header:'${text('主叫拨打时间')}', name:'callTime', index:'a.call_time', width:150, align:"center"},
		{header:'${text('被叫接听时间')}', name:'startTime', index:'a.start_time', width:150, align:"center"},
		{header:'${text('通话结束时间')}', name:'releaseTime', index:'a.release_time', width:150, align:"center"},
		{header:'${text('通话时长')}', name:'callDuration', index:'a.call_duration', width:150, align:"center"}		
// 		{header:'${text('状态')}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
// 			return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
// 		}},
// 		{header:'${text('创建时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"},
// 		{header:'${text('备注信息')}', name:'remarks', index:'a.remarks', width:150, align:"left"},
// 		{header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
// 			var actions = [];
// 			<% if(hasPermi('phonenumprivacy:natatoriumCallInfo:edit')){ %>
// 				actions.push('<a href="${ctx}/phonenumprivacy/natatoriumCallInfo/form?id='+row.id+'" class="btnList" title="${text('编辑游泳馆隐私号码呼叫记录')}"><i class="fa fa-pencil"></i></a>&nbsp;');
// 				actions.push('<a href="${ctx}/phonenumprivacy/natatoriumCallInfo/delete?id='+row.id+'" class="btnList" title="${text('删除游泳馆隐私号码呼叫记录')}" data-confirm="${text('确认要删除该游泳馆隐私号码呼叫记录吗？')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
// 			<% } %>
// 			return actions.join('');
// 		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>